<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFinanceTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('finance', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('resume_id')->nullable()->index()->comment('候选人');
            $table->unsignedInteger('position_id')->nullable()->index()->comment('职位');
            $table->unsignedInteger('client_id')->nullable()->index()->comment('所属客户');
            $table->unsignedInteger('from_id')->nullable()->index()->comment('渠道来源');
            $table->unsignedInteger('assign')->nullable()->index()->comment('推荐人');
            $table->timestamp('entry_time')->nullable()->comment('实际到岗');
            $table->string('quality')->comment('保质期');
            $table->string('receivable')->comment('应收金额');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('finance');
    }
}
